<template>
  <div>
      <h2 v-color="blue">我的文字</h2>
  </div>
</template>

<script>
export default {
    data(){
        return {
            blue:"blue"
        }
    },
    directices:{
        color:{
            // el 是一个dom元素
            bind:(el,binding)=>{
                el.style.color =binding.value;
            },
            updated(){},   
        },
    }
}
</script>

<style lang="scss" scoped>

</style>